<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<html>
  <head>
    <title>sort标签演示</title>
    </head>
  <body>
		<s:bean id="mycomparator" name="com.MyComparator" />
		<table border="1" width="200">
		    <!-- source属性对应的是用于排序的字符串 -->
			<s:sort source="{'Spring2.0', 'J2EE', 'abcdefghij', 'struts2'}" 
				comparator="#mycomparator">
				<s:iterator status="st">
					<tr <s:if test="#st.odd">style="background-color:#bbbbbb"</s:if>>
						<td><s:property /></td>
					</tr>
				</s:iterator>
			</s:sort>
		</table>
	</body>
</html>
